﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using Newtonsoft.Json;
using SqlSugar;

namespace Aioms.Models
{
    [SugarTable("rolepermission")]
    public class RolePermission
    {
        public RolePermission()
        {
            this.Created = DateTime.Now;
            this.Updated = DateTime.Now;

        }

        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [SugarColumn(ColumnName = "eid")]
        [JsonProperty("eid")]
        public long Eid { get; set; }

        [SugarColumn(ColumnName = "rid")]
        [JsonProperty("rid")]
        public long Rid { get; set; }

        [SugarColumn(ColumnName = "pmid")]
        [JsonProperty("pmid")]
        public long Pmid { get; set; }

        [SugarColumn(ColumnName = "created")]
        [JsonProperty("created")]
        public DateTime? Created { get; set; }

        [SugarColumn(ColumnName = "updated")]
        [JsonProperty("updated")]
        public DateTime? Updated { get; set; }
    }
}
